﻿@model GPS.ENTITYS.CrudModelDKH_LOP_DD
@using PagedList.Mvc;
@using GPS.Helpers;
@{
    ViewBag.Title = "Thêm mới học viên vào lớp";
}
@using (Html.BeginForm("DiemDanh", "GPS_DiemDanh", FormMethod.Post, new { enctype = "multipart/form-data", id = "form" }))
{
    @Html.ValidationSummary(true)
    <div class="row divbtnFielset">
        <div style="float: left;">
            @*<div class="row margin-top-05 btn_search">
                    <button type="submit" class="btn btn-warning btn-sm">
                        <span class="glyphicon glyphicon-search"></span> Tìm kiếm
                    </button>
                </div>*@
            <input type="button" value="Create" onclick="location.href='@Url.Action("DiemDanhHoc", "GPS_DiemDanh")'" />
            @*@Html.NoEncodeActionLink("<span class='glyphicon glyphicon-plus'></span> Thêm mới", "Thêm mới", "Create", "GPS_DiemDanh", null, htmlAttributes: new { @class = "btn btn-warning btn-sm" })*@
        </div>
        <div style="float: right;">
            <label id="lblMessageTotal" style="color:blue; font-weight:bold">Tổng số bản ghi: @ViewBag.TotalRow</label>
        </div>
    </div>

    <div class="row" style="clear:both; padding: 5px 0;">
        <table class="table table-hover table-bordered table-condensed">
            <tr>
                <th>
                    Mã Học Viên
                </th>
                <th>
                    Họ Đệm
                </th>
                <th>
                    Tên học viên
                </th>
                <th>
                    Có Tham gia học
                </th>
            </tr>
            @{
    int i = 0;
    var _char = "#";
    if (Model.Search_HV_Results != null)
    {
        foreach (var item in Model.Search_HV_Results)
        {
            i++;
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.HV_MA)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.HV_HODEM)

                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.HV_TEN)
                </td>

                <td>
                    @{
            foreach (var item1 in Model.SearchResults)
            {
                <input type="checkbox" name="chk_@i" value="@item1.KH_LOP_DD_COHOC@_char" />
            }
                    }
                </td>
            </tr>
        }

    }
            }
        </table>
    </div>
}
@*<div class="pagination-sm row" style="clear:both; padding: 5px 0;">
        @Html.PagedListPager(Model.SearchResults, page => Url.Action("_DiemDanh", new
        {
        page,
        Model.kKH_LOP_DD_DVGTVT_MA,
        Model.kKH_LOP_DD_KH_MA,
        Model.kKH_LOP_DD_KH_LOP_MA,
        Model.kKH_LOP_DD_NGAYDD
        }))
    </div>*@
